/*
 * @Description: 获取本地缓存信息
 * @Author: oscar
 * @Date: 2021-12-09 21:21:22
 */

const TokenKey = "token"; // 用户token

function getItem(key: string) {
  return window.localStorage.getItem(key);
}

function setItem(key: string, data: string) {
  return window.localStorage.setItem(key, data);
}

// 用户店铺token
export const getToken = () => {
  return getItem(TokenKey);
};

export const setToken = (token: string) => {
  return setItem(TokenKey, token);
};
